home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
data
/
fmgraph
/
g_drwmod.c
< prev
next >
Wrap
Text File
|
1991-10-18
|
682b
|
37 lines
#include <stdio.h>
#include <dos.h>
struct DRAWMODE {
unsigned type,escno,escln;
unsigned char mode,reserve;
};
extern unsigned char gds_fshift;
extern unsigned gds_wrkoff;
extern unsigned gds_wrkseg;
int g_drawmode(unsigned char mode)
{
union REGS reg;
struct SREGS seg;
struct {
unsigned len;
struct DRAWMODE drw;
} gdata;
segread(&seg);
reg.h.ah=gds_fshift+0x0f;
reg.x.di=(unsigned)&gdata;
seg.ds=seg.ss;
gdata.len=8;
gdata.drw.type=0x6026;
gdata.drw.escno=2;
gdata.drw.escln=2;
gdata.drw.mode=mode;
gdata.drw.reserve=0;
reg.x.bx=gds_wrkoff;
seg.es=gds_wrkseg;
int86x(0x92,®,®,&seg);
return (int)reg.h.ah;
}